package com.numberone.iotplatform.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import java.time.LocalDate;
import java.util.List;

@Data
public class DeviceFormDTO {
    @NotBlank(message = "设备名称不能为空")
    private String name;

    @NotBlank(message = "设备唯一ID不能为空")
    private String deviceUid;

    private String sn;
    private String model;
    private LocalDate productionDate;
    private LocalDate installDate;

    @NotNull(message = "必须选择安装位置")
    private Long locationId;

    @NotBlank(message = "IP地址不能为空")
    private String ipAddress;

    @NotNull(message = "端口不能为空")
    private Integer port;

    private String username;
    private String password;
    private String description;
    private String maintainer;
    private List<String> photos;
}